<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-bind</title>
    <style>
        .active{
            border:1px solid aqua;
        }
    </style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<img :src="imgSrc" alt="" width="200px" :title="imgtitle">
    <img :src="imgSrc" width="200px" :class="{active:isActive}" @click="togle">
</div>

<script>
    var app = new Vue({
        el:"#app",
        data:{
            imgSrc:"../img/1.jpg",
            imgtitle:"画师：bluesssatan",
            isActive:false
        },
        methods:{
                togle:function () {
                this.isActive = !this.isActive;

            }

        }
    })
</script>

</body>
</html>
